Bump python to 3.14#774
Open
MattyTheHacker wants to merge 14 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the project to target Python 3.14 and a newer py-cord, while modernizing type annotations and adjusting a few Discord-interaction edge cases.
Changes:
- Bump runtime to Python
3.14.*and update dependencies (notablypy-cord). - Modernize typing across the codebase (remove quoted annotations, use
Final[...], etc.). - Add/adjust some interaction/channel guards and update a few Discord API calls.
Reviewed changes
Copilot reviewed 59 out of 60 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/tex_bot_contexts.py | Modernize typing for exported names and context attributes. |
| utils/tex_bot_base_cog.py | Typing cleanup and safer ctx.command handling. |
| utils/tex_bot.py | Typing cleanup (incl. return annotations) and minor signature updates. |
| utils/suppress_traceback.py | Typing cleanup (remove quoted TracebackType). |
| utils/msl/memberships.py | Typing cleanup and minor constant formatting. |
| utils/msl/init.py | Typing cleanup for __all__. |
| utils/message_sender_components.py | Typing cleanup and interaction deletion API change. |
| utils/error_capture_decorators.py | Typing cleanup for decorators and logger. |
| utils/command_checks.py | Typing cleanup for decorator signatures and checks. |
| utils/init.py | Typing cleanup and formatting of SSL context creation. |
| tests/test_utils.py | Typing cleanup for __all__. |
| tests/init.py | Typing cleanup for __all__. |
| stubs/discord/init.pyi | Adjust stub exports (remove voice_client). |
| pyproject.toml | Bump Python requirement to 3.14 and update py-cord dependency. |
| main.py | Typing cleanup for __all__ and _run_bot signature. |
| exceptions/strike.py | Typing cleanup for __all__. |
| exceptions/msl.py | Typing cleanup for __all__. |
| exceptions/messages.py | Typing cleanup for __all__. |
| exceptions/guild.py | Typing cleanup for __all__. |
| exceptions/does_not_exist.py | Typing cleanup for __all__. |
| exceptions/config_changes.py | Typing cleanup for __all__ and init signature. |
| exceptions/committee_actions.py | Typing cleanup for __all__. |
| exceptions/base.py | Typing cleanup for __all__. |
| exceptions/init.py | Typing cleanup for __all__. |
| db/core/models/utils.py | Typing cleanup for Django model utilities and generics. |
| db/core/models/managers.py | Typing cleanup for __all__. |
| db/core/models/init.py | Typing cleanup in model metadata types. |
| db/core/app_config.py | Typing cleanup for __all__. |
| db/core/init.py | Typing cleanup for __all__. |
| db/_settings.py | Typing cleanup and constant formatting. |
| db/init.py | Typing cleanup for __all__. |
| config.py | Typing cleanup across settings definitions and loggers. |
| cogs/write_roles.py | Typing cleanup for command signature. |
| cogs/strike.py | Typing cleanup, add channel guard, and audit-log target checks. |
| cogs/stats/graphs.py | Typing cleanup for function signatures. |
| cogs/stats/counts.py | Typing cleanup for return types. |
| cogs/stats/init.py | Typing cleanup and add channel-type guards for commands. |
| cogs/startup.py | Typing cleanup for logger and __all__. |
| cogs/source.py | Typing cleanup for command signature. |
| cogs/send_introduction_reminders.py | Typing cleanup and UI decorator ignores. |
| cogs/send_get_roles_reminders.py | Typing cleanup and exception handling edits. |
| cogs/remind_me.py | Typing cleanup, add channel presence guard, and API call update. |
| cogs/ping.py | Typing cleanup for command signature. |
| cogs/make_member.py | Typing cleanup for logger/constants and command signatures. |
| cogs/make_applicant.py | Typing cleanup, emoji type update, and exception handling edits. |
| cogs/kill.py | Typing cleanup, UI decorator ignores, and command signature updates. |
| cogs/invite_link.py | Typing cleanup for command signature. |
| cogs/induct.py | Typing cleanup, emoji type update, and exception handling edits. |
| cogs/everest.py | Typing cleanup for constants and command signature. |
| cogs/edit_message.py | Typing cleanup and exception handling edits. |
| cogs/delete_all.py | Typing cleanup for model type and command signatures. |
| cogs/committee_actions_tracking.py | Typing cleanup and exception handling edits. |
| cogs/command_error.py | Typing cleanup and safer ctx.command handling. |
| cogs/check_su_platform_authorisation.py | Typing cleanup and constant formatting. |
| cogs/archive.py | Typing cleanup for autocomplete and command signatures. |
| cogs/annual_handover_and_reset.py | Typing cleanup for constants and command signatures. |
| cogs/add_users_to_threads_and_channels.py | Typing cleanup and exception handling edits. |
| cogs/init.py | Typing cleanup for setup signature and exports. |
| .python-version | Update local Python version pin to 3.14. |
Comments suppressed due to low confidence (3)
utils/tex_bot.py:1
close()does not appear to be non-returning (it awaitssuper().close()and then logs). Annotate it as returningNonerather thanNoReturn, otherwise type checkers will incorrectly treat code afterawait bot.close()as unreachable.
pyproject.toml:1- The inline TODO is now inconsistent with the actual setting (it already requires Python 3.14). Update/remove the comment so it reflects the current intent (e.g., a note about why 3.14 is required).
pyproject.toml:1 - Unbounded
py-cord>=2.8allows automatically upgrading into potentially breaking major releases. Consider adding an upper bound (e.g.,<3.0) or using a compatible release specifier to reduce the risk of unexpected production breakage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relies on #772